Context Free Grammar


Q31.

Which of the following features cannot be captured by context-free grammars?
GateOverflow

Q32.

Consider a grammar with the following productions S \rightarrow a \alpha b \mid b \alpha c \mid aB S \rightarrow \alpha S\mid b S \rightarrow \alpha b b\mid ab S \alpha \rightarrow bd b\mid b The above grammar is:
GateOverflow

Q33.

Choose the correct alternatives (more than one may be correct ) and write the corresponding letters only: Consider the SLR(1) and LALR (1) parsing tables for a context free grammar. Which of the following statement is/are true?
GateOverflow

Q34.

A context-free grammar is ambiguous if:
GateOverflow

Q35.

Which of the following statements are true? I. Every left-recursive grammar can be converted to a right-recursive grammar and vice-versa II. All \varepsilon-productions can be removed from any context-free grammar by suitable transformations III. The language generated by a context-free grammar all of whose productions are of the form x \rightarrow w or x \rightarrow wY (where, w is a string of terminals and Y is a non-terminal), is always regular IV. The derivation trees of strings generated by a context-free grammar in Chomsky Normal Form are always binary trees
GateOverflow